/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:Itop隐患排查
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2011-12-5 14:19:30
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.YHPC.Model
{
    /// <summary>
    ///[yhpcOrg]业务实体类
    ///对应表名:yhpcOrg
    /// </summary>
    [Serializable]
    public class yhpcOrg
    {
        
        #region Private 成员
        private string _id=Newid(); 
        private string _parentid=String.Empty; 
        private int _orderid=0; 
        private string _isgroup=String.Empty; 
        private string _dwcode=String.Empty; 
        private string _dwname=String.Empty; 
        private string _dwtype=String.Empty; 
        private string _dwowner=String.Empty; 
        private string _remark=String.Empty;   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：id
        /// 属性描述：dwID
        /// 字段信息：[id],nvarchar
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("dwID")]
        public string id
        {
            get { return _id; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[dwID]长度不能大于50!");
                if (_id as object == null || !_id.Equals(value))
                {
                    _id = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：ParentID
        /// 属性描述：ParentID
        /// 字段信息：[ParentID],nvarchar
        /// </summary>
        [DisplayNameAttribute("ParentID")]
        public string ParentID
        {
            get { return _parentid; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[ParentID]长度不能大于50!");
                if (_parentid as object == null || !_parentid.Equals(value))
                {
                    _parentid = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：orderID
        /// 属性描述：序号
        /// 字段信息：[orderID],int
        /// </summary>
        [DisplayNameAttribute("序号")]
        public int orderID
        {
            get { return _orderid; }
            set
            {			
                if (_orderid as object == null || !_orderid.Equals(value))
                {
                    _orderid = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：isgroup
        /// 属性描述：是否组
        /// 字段信息：[isgroup],nvarchar
        /// </summary>
        [DisplayNameAttribute("是否组")]
        public string isgroup
        {
            get { return _isgroup; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[是否组]长度不能大于50!");
                if (_isgroup as object == null || !_isgroup.Equals(value))
                {
                    _isgroup = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwCode
        /// 属性描述：单位代码
        /// 字段信息：[dwCode],nvarchar
        /// </summary>
        [DisplayNameAttribute("单位代码")]
        public string dwCode
        {
            get { return _dwcode; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[单位代码]长度不能大于50!");
                if (_dwcode as object == null || !_dwcode.Equals(value))
                {
                    _dwcode = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwName
        /// 属性描述：单位名称
        /// 字段信息：[dwName],nvarchar
        /// </summary>
        [DisplayNameAttribute("单位名称")]
        public string dwName
        {
            get { return _dwname; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[单位名称]长度不能大于50!");
                if (_dwname as object == null || !_dwname.Equals(value))
                {
                    _dwname = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwType
        /// 属性描述：单位分类
        /// 字段信息：[dwType],nvarchar
        /// </summary>
        [DisplayNameAttribute("单位分类")]
        public string dwType
        {
            get { return _dwtype; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[单位分类]长度不能大于50!");
                if (_dwtype as object == null || !_dwtype.Equals(value))
                {
                    _dwtype = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwOwner
        /// 属性描述：规属部门
        /// 字段信息：[dwOwner],nvarchar
        /// </summary>
        [DisplayNameAttribute("规属部门")]
        public string dwOwner
        {
            get { return _dwowner; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[规属部门]长度不能大于50!");
                if (_dwowner as object == null || !_dwowner.Equals(value))
                {
                    _dwowner = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Remark
        /// 属性描述：备注
        /// 字段信息：[Remark],nvarchar
        /// </summary>
        [DisplayNameAttribute("备注")]
        public string Remark
        {
            get { return _remark; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 250)
                throw new Exception("[备注]长度不能大于250!");
                if (_remark as object == null || !_remark.Equals(value))
                {
                    _remark = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
